﻿@model IList<CategoryModel>
@using Nop.Web.Models.Catalog;
@if (Model.Count > 0)
{
    var theme = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Web.Framework.Themes.IThemeContext>().WorkingDesktopTheme;
    
    <div class="home-page-category-grid">
        <div class="grid-title">
            <strong>@T(String.Format("SevenSpikes.Themes.{0}.Common.FeaturedCategories", theme))</strong>
        </div>
        <div class="item-grid">
            @foreach (var item in Model)
            {
                <div class="item-box">
                    <div class="category-item">
                        <h2 class="title">
                            <a href="@Url.RouteUrl("Category", new { SeName = item.SeName })" title="@item.PictureModel.Title">
                                @item.Name</a>
                        </h2>
                        <div class="picture">
                            <a href="@Url.RouteUrl("Category", new { SeName = item.SeName })" title="@item.PictureModel.Title">
                                <img alt="@item.PictureModel.AlternateText" src="@item.PictureModel.ImageUrl"
                                    title="@item.PictureModel.Title" /></a>
                        </div>
                    </div>
                </div>
            }
        </div>
    </div>
}